﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Entities</title>
<link type="text/css" rel="stylesheet" href="bootstrap.min.css" />
</head>

<body>

<ul>
	<li><a href="#DocConsiderations">Considerations</a></li>
	<li><a href="#DocSourceCodes">Source codes</a></li>
	<li><a href="#DocContributors">Contributors</a></li>
	<li><a href="#DocContact">Contact</a></li>
</ul>
<p>ASP.NET Boilerplate is designed to help us to develop applications using best 
practices without repeating ourselves. DRY - <strong>Don't Repeat Yourself!</strong> is the key idea behind ASP.NET 
Boilerplate.</p>
<p>All applications have some common problems and need to some common 
structures. ASP.NET Boilerplate is proper from small applications to large 
enterprise web applications to accomplish fast startups and maintanable code 
bases.</p>
<h3 id="DocConsiderations">Considerations</h3>
<p>Here, a list of concepts those are in mind while developing ASP.NET 
Boilerplate.</p>
<h4>Modularity</h4>
<p>It should be easy to share <a href="/Pages/Documents/Entities">entities</a>,
<a href="/Pages/Documents/Repositories">repositories</a>,
<a href="/Pages/Documents/Application-Services">services</a> and views between 
web applications. They should be packaged into
<a href="/Pages/Documents/Module-System">modules</a> and can be easily 
distributed (preferred as public/private nuget packages). Modules may depend on 
and use other modules. We should be able to extend models in a module for our 
application needs. </p>
<p>Modularity provides us "code re-usability" (DRY!). For example, we may 
develop a 
module that contains user management, role management, login page, error 
pages... Then all of these can be shared by our different applications. </p>
<h4>Best practices</h4>
<p>An application should be developed by considering best practices in software 
development. Using <a href="/Pages/Documents/Dependency-Injection">dependency 
injection</a> is one of the most important subjects in this area. Should use AOP 
(Aspect Oriented Programming) where it's needed and possible, especially for
<a href="http://en.wikipedia.org/wiki/Cross-cutting_concern" target="_blank">
cross-cutting concerns</a>. It should correctly use architectural patterns such 
as MVC and MVVM. Also, it should follow the
<a href="http://en.wikipedia.org/wiki/SOLID_(object-oriented_design)" target="_blank">
SOLID</a> principles in whole application.</p>
<p>Following best practices makes our code-base more understandable and 
extensible. It also prevents us to fall in common mistakes those are experienced 
before by other people.</p>
<h4>Scalable code base</h4>
<p>Architecture of an application should provide (even enforce) a way of keeping 
a maintainable code base. <a href="/Pages/Documents/NLayer-Architecture">
Layering</a> and <a href="/Pages/Documents/Module-System">modularity</a> are 
main techniques to accomplish that. Also, following best practices is important. 
Otherwise the application gets complicated when it grows. We know, there are 
many applications are re-written from zero just since it's too hard to maintain 
the code base (DRY!).</p>
<h4>Libraries &amp; frameworks</h4>
<p>An application should use and combine useful libraries &amp; frameworks to 
accomplish well-known tasks. Should not try to re-invent the whell if an 
existing tool meets it's requirements. It should concentrate to it's own job (to 
it's own business logic) as much as possible. For example, it may use
<a href="/Pages/Documents/EntityFramework-Integration">EntityFramework</a> or
<a href="/Pages/Documents/NHibernate-Integration">NHibernate</a> for 
Object-Relational Mapping. May use
<a href="https://angularjs.org/" target="_blank">AngularJs</a> or
<a href="http://durandaljs.com/" target="_blank">DurandalJs</a> as Single-Page 
Application framework.</p>
<p>Like or don't like it, today we need to learn many different tools to build 
an application.&nbsp;Even it's more complicated for client side. There are much more 
libraries (thousands of jQuery plug-ins for instance) and frameworks there. So, 
we should carefully choice libraries and adapt to our application.</p>
<p>ASP.NET Boilerplates composes and combines best tools for you while it preventing you from using your own favourite tools.</p>
<h4>Cross-cutting concerns</h4>
<p>Authorization, <a href="/Pages/Documents/Validating-Data-Transfer-Objects">
validation</a>, <a href="/Pages/Documents/Handling-Exceptions">error handling</a>, 
<a href="/Pages/Documents/Logging">logging</a>, caching... are common stuffs all 
applications implement in a some level. These codes should be generic and shared 
by different applications. It also should be seperated from business logic code 
and should be automated as much as possible. This allows us to more focus on our 
application specific business logic code and prevents us to re-think same stuff 
again and again (DRY!).</p>

<h4>More automation</h4>
<p>If it can be automated, it should be automated (at least in most case). 
Database migrations, unit tests, deployments are some of the tasks those can be 
automated. Automation saves our time in a long term (even in middle term) and 
prevents from mistakes of manual tasks (DRY!). </p>

<h4>Convention over configuration</h4>
<p>
<a href="http://en.wikipedia.org/wiki/Convention_over_configuration" target="_blank">
Convention over configuration</a> is a very popular principle. An application 
framework should implement defaults as much as possible. It should be easier when 
following conventions but also should be configurable when needed.</p>

<h4>Project startup</h4>
<p>It should be easy and fast to start a new application. We should not repeat 
some tedious steps to create an empty application (DRY!). Project/Solution
<a href="/Templates">templates</a> is a proper way of doing it.</p>

<h3 id="DocSourceCodes">Source codes</h3>
<p>ASP.NET Boilerplate is an open source project developed under Github.</p>
<ul>
	<li>Source code: <a href="https://github.com/aspnetboilerplate/aspnetboilerplate">https://github.com/aspnetboilerplate/aspnetboilerplate</a></li>
	<li>Project templates: <a href="https://github.com/aspnetboilerplate/aspnetboilerplate-templates">https://github.com/aspnetboilerplate/aspnetboilerplate-templates</a></li>
	<li>Sample projects: <a href="https://github.com/aspnetboilerplate/aspnetboilerplate-samples">https://github.com/aspnetboilerplate/aspnetboilerplate-samples</a></li>
	<li>Module-Zero: <a href="https://github.com/aspnetboilerplate/module-zero">https://github.com/aspnetboilerplate/module-zero</a></li>
</ul>
<h3 id="DocContributors">Contributors</h3>
<p>ASP.NET Boilerplate is designed and developed by <a href="http://www.halilibrahimkalkan.com/" target="_blank">Halil İbrahim 
Kalkan</a>. There are also
<a href="https://github.com/aspnetboilerplate/aspnetboilerplate/graphs/contributors" target="_blank">
contributors</a> on github. You can also fork repositories and send pull 
requests.</p>

<h3 id="DocContact">Contact</h3>
<p>For your questions and other discussions, use
<a href="http://forum.aspnetboilerplate.com/">official forum</a>.</p>
<p>For feature requests or bug reports, use
<a href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues">Github 
issues</a>.</p>
<p>For personal contact with me, use my
<a href="http://halilibrahimkalkan.com/contact/">web page</a>.</p>

</body>

</html>
